<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'activity.label', default: 'Activity')}"/>
    <title>预约列表</title>
</head>

<body>
<div class="main-body">
    <div class="page-wrapper">
        <div class="page-header">
            <div class="page-header-title">
                <h4>预约列表</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">预约列表</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="page-body">
            <div class="card">
                <div class="card-header">
                    <h5>预约列表</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">
                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

                            <table class="table table-striped  table-bordered table-hover">
                                <thead>
                                <tr>
                                    <g:sortableColumn property="activity" title="标题"/>
                                    <g:sortableColumn property="activity" title="执行人"/>
                                    <g:sortableColumn property="activity" title="所有者 "/>
                                    <g:sortableColumn property="activity" title="状态 "/>
                                    <g:sortableColumn property="activity" title="计划开始时间"/>
                                    <g:sortableColumn property="activity" title="计划结束时间"/>
                                </tr>
                                </thead>
                                <tbody>
                                <g:each in="${activityList}">
                                    <tr>
                                        <td>
                                            <g:link controller="activity" action="show" id="${it?.id}" class="firstTd">${it?.name}</g:link>
                                        </td>
                                        <td>
                                            ${it?.assignedTo?.fullName}
                                        </td>
                                        <td>
                                            ${it?.user?.fullName}
                                        </td>
                                        <td>
                                            ${it?.status}
                                        </td>
                                        <td>
                                            <g:formatDate date="${it?.startTime}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                        </td>
                                        <td>
                                            <g:formatDate date="${it?.endTime}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                        </td>
                                    </tr>
                                </g:each>
                                </tbody>
                            </table>

                            <div class="dataTables_paginate">
                                <div class="pagination">
                                    <g:paginate total="${activityCount ?: 0}" params="${params}"/>
                                </div>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<g:javascript>
    $(function () {
        $("#resetBtn").click(function () {
            $("#activity").val("");
            $("#type").val("");
        });
    });
</g:javascript>
</body>
</html>
